<template>
    <div>
        菜单管理
        <!-- 有children的时候默认会有子表格 -->
        <el-table :data="menuList" style="width: 100%"  
         row-key="id">
            <el-table-column type="selection" width="55" />
            <el-table-column prop="id" label="id" />
            <el-table-column prop="name" label="名称"  />
            <el-table-column prop="icon" label="图表" />
            <el-table-column prop="path" label="URL" />
            <el-table-column prop="des" label="描述" />
            <el-table-column prop="component" label="组件" />
        </el-table>
    </div>
</template>
<script setup>
// 获取菜单api
import  {GetMenu} from '@/api/permission'
import {ref} from 'vue';
const menuList = ref([]);
GetMenu()
.then(res=>{
    if(res.data.code==0){
        menuList.value = res.data.list;
    }else{
        alert("菜单获取失败");
    }
})
</script>